#!/bin/sh
rm -r output
mkdir output

nasm -f elf -o ./output/loader.elf loader.asm

for i in *.c 
  do gcc -I./inc -o ./output/$i.o -c $i -Wall -Wextra -nostdlib -nostartfiles -nodefaultlibs
done

ld -T linker.ld -o kernel.elf ./output/loader.elf ./output/*.c.o
nm kernel.elf | sort > system.map
